﻿package com.controller;

import java.io.File;

import java.io.IOException;
import java.sql.Timestamp;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;


import com.entity.Xinwentongzhi;
import com.entity.Yonghuzhuce;
import com.entity.Lvyougongsi;import com.entity.Lvyoujingdian;import com.entity.Lvyouxianlu;//jixacxishxu1
import com.entity.Teacher;
import com.server.XinwentongzhiServer;
import com.server.YonghuzhuceServer;
import com.server.LvyougongsiServer;import com.server.LvyoujingdianServer;import com.server.LvyouxianluServer;//jixacxishxu2
import com.server.TeacherServer;
import com.util.PageBean;

@Controller
public class IndexController {
	
	
	@Resource
	private XinwentongzhiServer xinwentongzhiService;
	@Resource
	private YonghuzhuceServer yonghuzhuceServer;
	@Resource	private LvyougongsiServer lvyougongsiServer;	@Resource	private LvyoujingdianServer lvyoujingdianServer;	@Resource	private LvyouxianluServer lvyouxianluServer;
	@Resource
	private TeacherServer teacherServer;	
	
	
	
//	首页显示内容
	@RequestMapping("index.do")
	public String showIndex(ModelMap map){

		List<Xinwentongzhi> syxinwentongzhi1=xinwentongzhiService.getsyxinwentongzhi1(null);
		List<Xinwentongzhi> syxinwentongzhi2=xinwentongzhiService.getsyxinwentongzhi2(null);
		List<Xinwentongzhi> syxinwentongzhi3=xinwentongzhiService.getsyxinwentongzhi3(null);

		List<Yonghuzhuce> syyonghuzhuce1=yonghuzhuceServer.getsyyonghuzhuce1(null);
		List<Lvyougongsi> sylvyougongsi1=lvyougongsiServer.getsylvyougongsi1(null);		List<Lvyougongsi> sylvyougongsi2=lvyougongsiServer.getsylvyougongsi2(null);		List<Lvyougongsi> sylvyougongsi3=lvyougongsiServer.getsylvyougongsi3(null);		List<Lvyoujingdian> sylvyoujingdian1=lvyoujingdianServer.getsylvyoujingdian1(null);		List<Lvyoujingdian> sylvyoujingdian2=lvyoujingdianServer.getsylvyoujingdian2(null);		List<Lvyoujingdian> sylvyoujingdian3=lvyoujingdianServer.getsylvyoujingdian3(null);		List<Lvyouxianlu> sylvyouxianlu1=lvyouxianluServer.getsylvyouxianlu1(null);		List<Lvyouxianlu> sylvyouxianlu2=lvyouxianluServer.getsylvyouxianlu2(null);		List<Lvyouxianlu> sylvyouxianlu3=lvyouxianluServer.getsylvyouxianlu3(null);
		
		List<Teacher> syTeacher1 = teacherServer.getTeacher1(null);		
		
	    map.put("syxinwentongzhi1", syxinwentongzhi1);
	    map.put("syxinwentongzhi2", syxinwentongzhi2);
	    map.put("syxinwentongzhi3", syxinwentongzhi3);
	    map.put("syyonghuzhuce1", syyonghuzhuce1);
	    map.put("sylvyougongsi1", sylvyougongsi1);	    map.put("sylvyougongsi2", sylvyougongsi2);	    map.put("sylvyougongsi3", sylvyougongsi3);	    map.put("sylvyoujingdian1", sylvyoujingdian1);	    map.put("sylvyoujingdian2", sylvyoujingdian2);	    map.put("sylvyoujingdian3", sylvyoujingdian3);	    map.put("sylvyouxianlu1", sylvyouxianlu1);	    map.put("sylvyouxianlu2", sylvyouxianlu2);	    map.put("sylvyouxianlu3", sylvyouxianlu3);
	    
	    map.put("syTeacher1", syTeacher1);	

		return "default";
	}

	

	
}
